home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / Quickdraw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  63.6 KB  |  2,033 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Quickdraw.h
  3.  
  4.      Contains:    Interface to Quickdraw Graphics
  5.  
  6.      Version:    Technology:    Mac OS 8.1
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __QUICKDRAW__
  18. #define __QUICKDRAW__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23. #ifndef __MIXEDMODE__
  24. #include <MixedMode.h>
  25. #endif
  26. #ifndef __QUICKDRAWTEXT__
  27. #include <QuickdrawText.h>
  28. #endif
  29.  
  30.  
  31.  
  32. #if PRAGMA_ONCE
  33. #pragma once
  34. #endif
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. #if PRAGMA_IMPORT
  41. #pragma import on
  42. #endif
  43.  
  44. #if PRAGMA_STRUCT_ALIGN
  45.     #pragma options align=mac68k
  46. #elif PRAGMA_STRUCT_PACKPUSH
  47.     #pragma pack(push, 2)
  48. #elif PRAGMA_STRUCT_PACK
  49.     #pragma pack(2)
  50. #endif
  51.  
  52.  
  53. enum {
  54.     invalColReq                    = -1                            /*invalid color table request*/
  55. };
  56.  
  57.  
  58. enum {
  59.                                                                 /* transfer modes */
  60.     srcCopy                        = 0,                            /*the 16 transfer modes*/
  61.     srcOr                        = 1,
  62.     srcXor                        = 2,
  63.     srcBic                        = 3,
  64.     notSrcCopy                    = 4,
  65.     notSrcOr                    = 5,
  66.     notSrcXor                    = 6,
  67.     notSrcBic                    = 7,
  68.     patCopy                        = 8,
  69.     patOr                        = 9,
  70.     patXor                        = 10,
  71.     patBic                        = 11,
  72.     notPatCopy                    = 12,
  73.     notPatOr                    = 13,
  74.     notPatXor                    = 14,
  75.     notPatBic                    = 15,                            /* Special Text Transfer Mode */
  76.     grayishTextOr                = 49,
  77.     hilitetransfermode            = 50,
  78.     hilite                        = 50,                            /* Arithmetic transfer modes */
  79.     blend                        = 32,
  80.     addPin                        = 33,
  81.     addOver                        = 34,
  82.     subPin                        = 35,
  83.     addMax                        = 37,
  84.     adMax                        = 37,
  85.     subOver                        = 38,
  86.     adMin                        = 39,
  87.     ditherCopy                    = 64,                            /* Transparent mode constant */
  88.     transparent                    = 36
  89. };
  90.  
  91.  
  92. enum {
  93.     italicBit                    = 1,
  94.     ulineBit                    = 2,
  95.     outlineBit                    = 3,
  96.     shadowBit                    = 4,
  97.     condenseBit                    = 5,
  98.     extendBit                    = 6
  99. };
  100.  
  101.  
  102. enum {
  103.                                                                 /* QuickDraw color separation constants */
  104.     normalBit                    = 0,                            /*normal screen mapping*/
  105.     inverseBit                    = 1,                            /*inverse screen mapping*/
  106.     redBit                        = 4,                            /*RGB additive mapping*/
  107.     greenBit                    = 3,
  108.     blueBit                        = 2,
  109.     cyanBit                        = 8,                            /*CMYBk subtractive mapping*/
  110.     magentaBit                    = 7,
  111.     yellowBit                    = 6,
  112.     blackBit                    = 5
  113. };
  114.  
  115.  
  116. enum {
  117.     blackColor                    = 33,                            /*colors expressed in these mappings*/
  118.     whiteColor                    = 30,
  119.     redColor                    = 205,
  120.     greenColor                    = 341,
  121.     blueColor                    = 409,
  122.     cyanColor                    = 273,
  123.     magentaColor                = 137,
  124.     yellowColor                    = 69
  125. };
  126.  
  127.  
  128. enum {
  129.     picLParen                    = 0,                            /*standard picture comments*/
  130.     picRParen                    = 1,
  131.     clutType                    = 0,                            /*0 if lookup table*/
  132.     fixedType                    = 1,                            /*1 if fixed table*/
  133.     directType                    = 2,                            /*2 if direct values*/
  134.     gdDevType                    = 0                                /*0 = monochrome 1 = color*/
  135. };
  136.  
  137.  
  138. enum {
  139.     interlacedDevice            = 2,                            /* 1 if single pixel lines look bad */
  140.     roundedDevice                = 5,                            /* 1 if device has been “rounded” into the GrayRgn */
  141.     hasAuxMenuBar                = 6,                            /* 1 if device has an aux menu bar on it */
  142.     burstDevice                    = 7,
  143.     ext32Device                    = 8,
  144.     ramInit                        = 10,                            /*1 if initialized from 'scrn' resource*/
  145.     mainScreen                    = 11,                            /* 1 if main screen */
  146.     allInit                        = 12,                            /* 1 if all devices initialized */
  147.     screenDevice                = 13,                            /*1 if screen device [not used]*/
  148.     noDriver                    = 14,                            /* 1 if no driver for this GDevice */
  149.     screenActive                = 15,                            /*1 if in use*/
  150.     hiliteBit                    = 7,                            /*flag bit in HiliteMode (lowMem flag)*/
  151.     pHiliteBit                    = 0,                            /*flag bit in HiliteMode used with BitClr procedure*/
  152.     defQDColors                    = 127,                            /*resource ID of clut for default QDColors*/
  153.                                                                 /* pixel type */
  154.     RGBDirect                    = 16,                            /* 16 & 32 bits/pixel pixelType value */
  155.                                                                 /* pmVersion values */
  156.     baseAddr32                    = 4                                /*pixmap base address is 32-bit address*/
  157. };
  158.  
  159.  
  160.  
  161. enum {
  162.     sysPatListID                = 0,
  163.     iBeamCursor                    = 1,
  164.     crossCursor                    = 2,
  165.     plusCursor                    = 3,
  166.     watchCursor                    = 4
  167. };
  168.  
  169.  
  170. enum {
  171.     kQDGrafVerbFrame            = 0,
  172.     kQDGrafVerbPaint            = 1,
  173.     kQDGrafVerbErase            = 2,
  174.     kQDGrafVerbInvert            = 3,
  175.     kQDGrafVerbFill                = 4
  176. };
  177.  
  178. #if OLDROUTINENAMES
  179.  
  180. enum {
  181.     frame                        = kQDGrafVerbFrame,
  182.     paint                        = kQDGrafVerbPaint,
  183.     erase                        = kQDGrafVerbErase,
  184.     invert                        = kQDGrafVerbInvert,
  185.     fill                        = kQDGrafVerbFill
  186. };
  187.  
  188. #endif  /* OLDROUTINENAMES */
  189.  
  190. typedef SInt8                             GrafVerb;
  191.  
  192. enum {
  193.     chunky                        = 0,
  194.     chunkyPlanar                = 1,
  195.     planar                        = 2
  196. };
  197.  
  198. typedef SInt8                             PixelType;
  199. typedef short                             Bits16[16];
  200.  
  201. /***************   IMPORTANT NOTE REGARDING Pattern  **************************************
  202.    Patterns were originally defined as:
  203.    
  204.         C:             typedef unsigned char Pattern[8];
  205.         Pascal:        Pattern = PACKED ARRAY [0..7] OF 0..255;
  206.         
  207.    The old array definition of Pattern would cause 68000 based CPU's to crash in certain circum-
  208.    stances. The new struct definition is safe, but may require source code changes to compile.
  209.     
  210. *********************************************************************************************/
  211.  
  212. struct Pattern {
  213.     UInt8                             pat[8];
  214. };
  215. typedef struct Pattern                    Pattern;
  216. /*
  217.  ConstPatternParam is no longer needed.  It was first created when Pattern was an array.
  218.  Now that Pattern is a struct, it is more straight forward to just add the "const" qualifier
  219.  on the parameter type (e.g. "const Pattern * pat" instead of "ConstPatternParam pat").
  220. */
  221.  
  222. typedef const Pattern *                    ConstPatternParam;
  223. typedef Pattern *                        PatPtr;
  224. typedef PatPtr *                        PatHandle;
  225. typedef SignedByte                         QDByte;
  226. typedef QDByte *                        QDPtr;
  227. typedef QDPtr *                            QDHandle;
  228. typedef short                             QDErr;
  229.  
  230. enum {
  231.     singleDevicesBit            = 0,
  232.     dontMatchSeedsBit            = 1,
  233.     allDevicesBit                = 2
  234. };
  235.  
  236.  
  237. enum {
  238.     singleDevices                = 1 << singleDevicesBit,
  239.     dontMatchSeeds                = 1 << dontMatchSeedsBit,
  240.     allDevices                    = 1 << allDevicesBit
  241. };
  242.  
  243. typedef unsigned long                     DeviceLoopFlags;
  244. /*
  245.     PrinterStatusOpcode.  For communication with downloading and printing services.
  246. */
  247. typedef SInt32                             PrinterStatusOpcode;
  248.  
  249. enum {
  250.     kPrinterFontStatus            = 0,
  251.     kPrinterScalingStatus        = 1
  252. };
  253.  
  254.  
  255. struct PrinterFontStatus {
  256.     SInt32                             oResult;
  257.     SInt16                             iFondID;
  258.     Style                             iStyle;
  259. };
  260. typedef struct PrinterFontStatus        PrinterFontStatus;
  261.  
  262. struct PrinterScalingStatus {
  263.     Point                             oScalingFactors;
  264. };
  265. typedef struct PrinterScalingStatus        PrinterScalingStatus;
  266.  
  267. struct BitMap {
  268.     Ptr                             baseAddr;
  269.     short                             rowBytes;
  270.     Rect                             bounds;
  271. };
  272. typedef struct BitMap                    BitMap;
  273. typedef BitMap *                        BitMapPtr;
  274. typedef BitMapPtr *                        BitMapHandle;
  275.  
  276. struct Cursor {
  277.     Bits16                             data;
  278.     Bits16                             mask;
  279.     Point                             hotSpot;
  280. };
  281. typedef struct Cursor                    Cursor;
  282.  
  283. typedef Cursor *                        CursPtr;
  284. typedef CursPtr *                        CursHandle;
  285.  
  286. struct PenState {
  287.     Point                             pnLoc;
  288.     Point                             pnSize;
  289.     short                             pnMode;
  290.     Pattern                         pnPat;
  291. };
  292. typedef struct PenState                    PenState;
  293.  
  294. struct MacRegion {
  295.     unsigned short                     rgnSize;                    /*size in bytes*/
  296.     Rect                             rgnBBox;                    /*enclosing rectangle*/
  297. };
  298. typedef struct MacRegion                MacRegion;
  299. /*
  300.     The type name "Region" has a name space collision on Win32.
  301.     Use MacRegion to be cross-platfrom safe.
  302. */
  303. #if TARGET_OS_MAC
  304.  
  305. typedef MacRegion                         Region;
  306. #endif  /* TARGET_OS_MAC */
  307.  
  308. typedef MacRegion *                        RgnPtr;
  309. typedef RgnPtr *                        RgnHandle;
  310.  
  311. struct Picture {
  312.     short                             picSize;
  313.     Rect                             picFrame;
  314. };
  315. typedef struct Picture                    Picture;
  316.  
  317. typedef Picture *                        PicPtr;
  318. typedef PicPtr *                        PicHandle;
  319.  
  320. struct MacPolygon {
  321.     short                             polySize;
  322.     Rect                             polyBBox;
  323.     Point                             polyPoints[1];
  324. };
  325. typedef struct MacPolygon                MacPolygon;
  326. /*
  327.     The type name "Polygon" has a name space collision on Win32.
  328.     Use MacPolygon to be cross-platfrom safe.
  329. */
  330. #if TARGET_OS_MAC
  331.  
  332. typedef MacPolygon                         Polygon;
  333. #endif  /* TARGET_OS_MAC */
  334.  
  335. typedef MacPolygon *                    PolyPtr;
  336. typedef PolyPtr *                        PolyHandle;
  337. typedef CALLBACK_API( void , QDTextProcPtr )(short byteCount, Ptr textBuf, Point numer, Point denom);
  338. typedef CALLBACK_API( void , QDLineProcPtr )(Point newPt);
  339. typedef CALLBACK_API( void , QDRectProcPtr )(GrafVerb verb, Rect *r);
  340. typedef CALLBACK_API( void , QDRRectProcPtr )(GrafVerb verb, Rect *r, short ovalWidth, short ovalHeight);
  341. typedef CALLBACK_API( void , QDOvalProcPtr )(GrafVerb verb, Rect *r);
  342. typedef CALLBACK_API( void , QDArcProcPtr )(GrafVerb verb, Rect *r, short startAngle, short arcAngle);
  343. typedef CALLBACK_API( void , QDPolyProcPtr )(GrafVerb verb, PolyHandle poly);
  344. typedef CALLBACK_API( void , QDRgnProcPtr )(GrafVerb verb, RgnHandle rgn);
  345. typedef CALLBACK_API( void , QDBitsProcPtr )(BitMap *srcBits, Rect *srcRect, Rect *dstRect, short mode, RgnHandle maskRgn);
  346. typedef CALLBACK_API( void , QDCommentProcPtr )(short kind, short dataSize, Handle dataHandle);
  347. typedef CALLBACK_API( short , QDTxMeasProcPtr )(short byteCount, Ptr textAddr, Point *numer, Point *denom, FontInfo *info);
  348. typedef CALLBACK_API( void , QDGetPicProcPtr )(Ptr dataPtr, short byteCount);
  349. typedef CALLBACK_API( void , QDPutPicProcPtr )(Ptr dataPtr, short byteCount);
  350. typedef CALLBACK_API( void , QDOpcodeProcPtr )(Rect *fromRect, Rect *toRect, short opcode, short version);
  351. typedef CALLBACK_API_C( OSStatus , QDStdGlyphsProcPtr )(void *dataStream, ByteCount size);
  352. typedef CALLBACK_API( void , QDJShieldCursorProcPtr )(short left, short top, short right, short bottom);
  353. typedef STACK_UPP_TYPE(QDTextProcPtr)                             QDTextUPP;
  354. typedef STACK_UPP_TYPE(QDLineProcPtr)                             QDLineUPP;
  355. typedef STACK_UPP_TYPE(QDRectProcPtr)                             QDRectUPP;
  356. typedef STACK_UPP_TYPE(QDRRectProcPtr)                             QDRRectUPP;
  357. typedef STACK_UPP_TYPE(QDOvalProcPtr)                             QDOvalUPP;
  358. typedef STACK_UPP_TYPE(QDArcProcPtr)                             QDArcUPP;
  359. typedef STACK_UPP_TYPE(QDPolyProcPtr)                             QDPolyUPP;
  360. typedef STACK_UPP_TYPE(QDRgnProcPtr)                             QDRgnUPP;
  361. typedef STACK_UPP_TYPE(QDBitsProcPtr)                             QDBitsUPP;
  362. typedef STACK_UPP_TYPE(QDCommentProcPtr)                         QDCommentUPP;
  363. typedef STACK_UPP_TYPE(QDTxMeasProcPtr)                         QDTxMeasUPP;
  364. typedef STACK_UPP_TYPE(QDGetPicProcPtr)                         QDGetPicUPP;
  365. typedef STACK_UPP_TYPE(QDPutPicProcPtr)                         QDPutPicUPP;
  366. typedef STACK_UPP_TYPE(QDOpcodeProcPtr)                         QDOpcodeUPP;
  367. typedef STACK_UPP_TYPE(QDStdGlyphsProcPtr)                         QDStdGlyphsUPP;
  368. typedef STACK_UPP_TYPE(QDJShieldCursorProcPtr)                     QDJShieldCursorUPP;
  369.  
  370. struct QDProcs {
  371.     QDTextUPP                         textProc;
  372.     QDLineUPP                         lineProc;
  373.     QDRectUPP                         rectProc;
  374.     QDRRectUPP                         rRectProc;
  375.     QDOvalUPP                         ovalProc;
  376.     QDArcUPP                         arcProc;
  377.     QDPolyUPP                         polyProc;
  378.     QDRgnUPP                         rgnProc;
  379.     QDBitsUPP                         bitsProc;
  380.     QDCommentUPP                     commentProc;
  381.     QDTxMeasUPP                     txMeasProc;
  382.     QDGetPicUPP                     getPicProc;
  383.     QDPutPicUPP                     putPicProc;
  384. };
  385. typedef struct QDProcs                    QDProcs;
  386. typedef QDProcs *                        QDProcsPtr;
  387. enum { uppQDTextProcInfo = 0x00003F80 };                         /* pascal no_return_value Func(2_bytes, 4_bytes, 4_bytes, 4_bytes) */
  388. enum { uppQDLineProcInfo = 0x000000C0 };                         /* pascal no_return_value Func(4_bytes) */
  389. enum { uppQDRectProcInfo = 0x00000340 };                         /* pascal no_return_value Func(1_byte, 4_bytes) */
  390. enum { uppQDRRectProcInfo = 0x00002B40 };                         /* pascal no_return_value Func(1_byte, 4_bytes, 2_bytes, 2_bytes) */
  391. enum { uppQDOvalProcInfo = 0x00000340 };                         /* pascal no_return_value Func(1_byte, 4_bytes) */
  392. enum { uppQDArcProcInfo = 0x00002B40 };                         /* pascal no_return_value Func(1_byte, 4_bytes, 2_bytes, 2_bytes) */
  393. enum { uppQDPolyProcInfo = 0x00000340 };                         /* pascal no_return_value Func(1_byte, 4_bytes) */
  394. enum { uppQDRgnProcInfo = 0x00000340 };                         /* pascal no_return_value Func(1_byte, 4_bytes) */
  395. enum { uppQDBitsProcInfo = 0x0000EFC0 };                         /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes) */
  396. enum { uppQDCommentProcInfo = 0x00000E80 };                     /* pascal no_return_value Func(2_bytes, 2_bytes, 4_bytes) */
  397. enum { uppQDTxMeasProcInfo = 0x0000FFA0 };                         /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  398. enum { uppQDGetPicProcInfo = 0x000002C0 };                         /* pascal no_return_value Func(4_bytes, 2_bytes) */
  399. enum { uppQDPutPicProcInfo = 0x000002C0 };                         /* pascal no_return_value Func(4_bytes, 2_bytes) */
  400. enum { uppQDOpcodeProcInfo = 0x00002BC0 };                         /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes) */
  401. enum { uppQDStdGlyphsProcInfo = 0x000003F1 };                     /* 4_bytes Func(4_bytes, 4_bytes) */
  402. enum { uppQDJShieldCursorProcInfo = 0x00002A80 };                 /* pascal no_return_value Func(2_bytes, 2_bytes, 2_bytes, 2_bytes) */
  403. #define NewQDTextProc(userRoutine)                                 (QDTextUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDTextProcInfo, GetCurrentArchitecture())
  404. #define NewQDLineProc(userRoutine)                                 (QDLineUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDLineProcInfo, GetCurrentArchitecture())
  405. #define NewQDRectProc(userRoutine)                                 (QDRectUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRectProcInfo, GetCurrentArchitecture())
  406. #define NewQDRRectProc(userRoutine)                             (QDRRectUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRRectProcInfo, GetCurrentArchitecture())
  407. #define NewQDOvalProc(userRoutine)                                 (QDOvalUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDOvalProcInfo, GetCurrentArchitecture())
  408. #define NewQDArcProc(userRoutine)                                 (QDArcUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDArcProcInfo, GetCurrentArchitecture())
  409. #define NewQDPolyProc(userRoutine)                                 (QDPolyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPolyProcInfo, GetCurrentArchitecture())
  410. #define NewQDRgnProc(userRoutine)                                 (QDRgnUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRgnProcInfo, GetCurrentArchitecture())
  411. #define NewQDBitsProc(userRoutine)                                 (QDBitsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDBitsProcInfo, GetCurrentArchitecture())
  412. #define NewQDCommentProc(userRoutine)                             (QDCommentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDCommentProcInfo, GetCurrentArchitecture())
  413. #define NewQDTxMeasProc(userRoutine)                             (QDTxMeasUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDTxMeasProcInfo, GetCurrentArchitecture())
  414. #define NewQDGetPicProc(userRoutine)                             (QDGetPicUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDGetPicProcInfo, GetCurrentArchitecture())
  415. #define NewQDPutPicProc(userRoutine)                             (QDPutPicUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPutPicProcInfo, GetCurrentArchitecture())
  416. #define NewQDOpcodeProc(userRoutine)                             (QDOpcodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDOpcodeProcInfo, GetCurrentArchitecture())
  417. #define NewQDStdGlyphsProc(userRoutine)                         (QDStdGlyphsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDStdGlyphsProcInfo, GetCurrentArchitecture())
  418. #define NewQDJShieldCursorProc(userRoutine)                     (QDJShieldCursorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDJShieldCursorProcInfo, GetCurrentArchitecture())
  419. #define CallQDTextProc(userRoutine, byteCount, textBuf, numer, denom)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDTextProcInfo, (byteCount), (textBuf), (numer), (denom))
  420. #define CallQDLineProc(userRoutine, newPt)                         CALL_ONE_PARAMETER_UPP((userRoutine), uppQDLineProcInfo, (newPt))
  421. #define CallQDRectProc(userRoutine, verb, r)                     CALL_TWO_PARAMETER_UPP((userRoutine), uppQDRectProcInfo, (verb), (r))
  422. #define CallQDRRectProc(userRoutine, verb, r, ovalWidth, ovalHeight)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDRRectProcInfo, (verb), (r), (ovalWidth), (ovalHeight))
  423. #define CallQDOvalProc(userRoutine, verb, r)                     CALL_TWO_PARAMETER_UPP((userRoutine), uppQDOvalProcInfo, (verb), (r))
  424. #define CallQDArcProc(userRoutine, verb, r, startAngle, arcAngle)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDArcProcInfo, (verb), (r), (startAngle), (arcAngle))
  425. #define CallQDPolyProc(userRoutine, verb, poly)                 CALL_TWO_PARAMETER_UPP((userRoutine), uppQDPolyProcInfo, (verb), (poly))
  426. #define CallQDRgnProc(userRoutine, verb, rgn)                     CALL_TWO_PARAMETER_UPP((userRoutine), uppQDRgnProcInfo, (verb), (rgn))
  427. #define CallQDBitsProc(userRoutine, srcBits, srcRect, dstRect, mode, maskRgn)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppQDBitsProcInfo, (srcBits), (srcRect), (dstRect), (mode), (maskRgn))
  428. #define CallQDCommentProc(userRoutine, kind, dataSize, dataHandle)  CALL_THREE_PARAMETER_UPP((userRoutine), uppQDCommentProcInfo, (kind), (dataSize), (dataHandle))
  429. #define CallQDTxMeasProc(userRoutine, byteCount, textAddr, numer, denom, info)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppQDTxMeasProcInfo, (byteCount), (textAddr), (numer), (denom), (info))
  430. #define CallQDGetPicProc(userRoutine, dataPtr, byteCount)         CALL_TWO_PARAMETER_UPP((userRoutine), uppQDGetPicProcInfo, (dataPtr), (byteCount))
  431. #define CallQDPutPicProc(userRoutine, dataPtr, byteCount)         CALL_TWO_PARAMETER_UPP((userRoutine), uppQDPutPicProcInfo, (dataPtr), (byteCount))
  432. #define CallQDOpcodeProc(userRoutine, fromRect, toRect, opcode, version)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDOpcodeProcInfo, (fromRect), (toRect), (opcode), (version))
  433. #define CallQDStdGlyphsProc(userRoutine, dataStream, size)         CALL_TWO_PARAMETER_UPP((userRoutine), uppQDStdGlyphsProcInfo, (dataStream), (size))
  434. #define CallQDJShieldCursorProc(userRoutine, left, top, right, bottom)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDJShieldCursorProcInfo, (left), (top), (right), (bottom))
  435.  
  436. struct GrafPort {
  437.     short                             device;
  438.     BitMap                             portBits;
  439.     Rect                             portRect;
  440.     RgnHandle                         visRgn;
  441.     RgnHandle                         clipRgn;
  442.     Pattern                         bkPat;
  443.     Pattern                         fillPat;
  444.     Point                             pnLoc;
  445.     Point                             pnSize;
  446.     short                             pnMode;
  447.     Pattern                         pnPat;
  448.     short                             pnVis;
  449.     short                             txFont;
  450.     StyleField                         txFace;                        /*StyleField occupies 16-bits, but only first 8-bits are used*/
  451.     short                             txMode;
  452.     short                             txSize;
  453.     Fixed                             spExtra;
  454.     long                             fgColor;
  455.     long                             bkColor;
  456.     short                             colrBit;
  457.     short                             patStretch;
  458.     Handle                             picSave;
  459.     Handle                             rgnSave;
  460.     Handle                             polySave;
  461.     QDProcsPtr                         grafProcs;
  462. };
  463. typedef struct GrafPort                    GrafPort;
  464.  
  465. typedef GrafPort *                        GrafPtr;
  466.  
  467. /*
  468.  *    This set of definitions "belongs" in Windows.
  469.  *    But, there is a circularity in the headers where Windows includes Controls and
  470.  *    Controls includes Windows. To break the circle, the information
  471.  *    needed by Controls is moved from Windows to Quickdraw.
  472.  */
  473. typedef GrafPtr                         WindowPtr;
  474. typedef WindowPtr                         DialogPtr;
  475. typedef WindowPtr                         WindowRef;
  476. /* DragConstraint constants to pass to DragGray,DragTheRgn, or ConstrainedDragRgn*/
  477. typedef UInt16                             DragConstraint;
  478.  
  479. enum {
  480.     kNoConstraint                = 0,
  481.     kVerticalConstraint            = 1,
  482.     kHorizontalConstraint        = 2
  483. };
  484.  
  485.  
  486. typedef CALLBACK_API( void , DragGrayRgnProcPtr )(void );
  487. /*
  488.  *    Here ends the list of things that "belong" in Windows.
  489.  */
  490.  
  491.  
  492.  
  493. struct RGBColor {
  494.     unsigned short                     red;                        /*magnitude of red component*/
  495.     unsigned short                     green;                        /*magnitude of green component*/
  496.     unsigned short                     blue;                        /*magnitude of blue component*/
  497. };
  498. typedef struct RGBColor                    RGBColor;
  499. typedef RGBColor *                        RGBColorPtr;
  500. typedef RGBColorPtr *                    RGBColorHdl;
  501. typedef CALLBACK_API( Boolean , ColorSearchProcPtr )(RGBColor *rgb, long *position);
  502. typedef CALLBACK_API( Boolean , ColorComplementProcPtr )(RGBColor *rgb);
  503. typedef STACK_UPP_TYPE(DragGrayRgnProcPtr)                         DragGrayRgnUPP;
  504. typedef STACK_UPP_TYPE(ColorSearchProcPtr)                         ColorSearchUPP;
  505. typedef STACK_UPP_TYPE(ColorComplementProcPtr)                     ColorComplementUPP;
  506. enum { uppDragGrayRgnProcInfo = 0x00000000 };                     /* pascal no_return_value Func() */
  507. enum { uppColorSearchProcInfo = 0x000003D0 };                     /* pascal 1_byte Func(4_bytes, 4_bytes) */
  508. enum { uppColorComplementProcInfo = 0x000000D0 };                 /* pascal 1_byte Func(4_bytes) */
  509. #define NewDragGrayRgnProc(userRoutine)                         (DragGrayRgnUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragGrayRgnProcInfo, GetCurrentArchitecture())
  510. #define NewColorSearchProc(userRoutine)                         (ColorSearchUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorSearchProcInfo, GetCurrentArchitecture())
  511. #define NewColorComplementProc(userRoutine)                     (ColorComplementUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorComplementProcInfo, GetCurrentArchitecture())
  512. #define CallDragGrayRgnProc(userRoutine)                         CALL_ZERO_PARAMETER_UPP((userRoutine), uppDragGrayRgnProcInfo)
  513. #define CallColorSearchProc(userRoutine, rgb, position)         CALL_TWO_PARAMETER_UPP((userRoutine), uppColorSearchProcInfo, (rgb), (position))
  514. #define CallColorComplementProc(userRoutine, rgb)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppColorComplementProcInfo, (rgb))
  515.  
  516. struct ColorSpec {
  517.     short                             value;                        /*index or other value*/
  518.     RGBColor                         rgb;                        /*true color*/
  519. };
  520. typedef struct ColorSpec                ColorSpec;
  521. typedef ColorSpec *                        ColorSpecPtr;
  522.  
  523. typedef ColorSpec                         CSpecArray[1];
  524.  
  525. struct ColorTable {
  526.     long                             ctSeed;                        /*unique identifier for table*/
  527.     short                             ctFlags;                    /*high bit: 0 = PixMap; 1 = device*/
  528.     short                             ctSize;                        /*number of entries in CTTable*/
  529.     CSpecArray                         ctTable;                    /*array [0..0] of ColorSpec*/
  530. };
  531. typedef struct ColorTable                ColorTable;
  532.  
  533. typedef ColorTable *                    CTabPtr;
  534. typedef CTabPtr *                        CTabHandle;
  535.  
  536. struct xColorSpec {
  537.     short                             value;                        /*index or other value*/
  538.     RGBColor                         rgb;                        /*true color*/
  539.     short                             xalpha;
  540. };
  541. typedef struct xColorSpec                xColorSpec;
  542. typedef xColorSpec *                    xColorSpecPtr;
  543.  
  544. typedef xColorSpec                         xCSpecArray[1];
  545.  
  546. struct MatchRec {
  547.     unsigned short                     red;
  548.     unsigned short                     green;
  549.     unsigned short                     blue;
  550.     long                             matchData;
  551. };
  552. typedef struct MatchRec                    MatchRec;
  553. /*
  554.     QuickTime 3.0 makes PixMap data structure available on non-Mac OS's.
  555.     In order to implement PixMap in these alternate environments, the PixMap
  556.     had to be extended. The pmReserved field was changed to pmExt which is
  557.     a Handle to extra info.  The planeBytes field was changed to pixelFormat.
  558. */
  559. #ifndef OLDPIXMAPSTRUCT
  560. #if TARGET_OS_MAC
  561. #define OLDPIXMAPSTRUCT 1
  562. #else
  563. #define OLDPIXMAPSTRUCT 0
  564. #endif  /* TARGET_OS_MAC */
  565.  
  566. #endif  /* !defined(OLDPIXMAPSTRUCT) */
  567.  
  568.  
  569. #if OLDPIXMAPSTRUCT
  570.     #define GETPIXMAPPIXELFORMAT(pm)        ( (pm)->pixelSize )
  571. #else
  572.     #define GETPIXMAPPIXELFORMAT(pm)        ( ((pm)->pixelFormat != 0) ? (pm)->pixelFormat : (pm)->pixelSize )
  573. #endif
  574.  
  575.  
  576. #if TARGET_OS_MAC || (NeXT && ppc)
  577.     #define NON_MAC_PIXEL_FORMATS   0
  578. #else
  579.     #define NON_MAC_PIXEL_FORMATS   1
  580. #endif
  581.  
  582. /* pixel formats*/
  583.  
  584. enum {
  585.     k1MonochromePixelFormat        = 0x00000001,                    /* 1 bit indexed*/
  586.     k2IndexedPixelFormat        = 0x00000002,                    /* 2 bit indexed*/
  587.     k4IndexedPixelFormat        = 0x00000004,                    /* 4 bit indexed*/
  588.     k8IndexedPixelFormat        = 0x00000008,                    /* 8 bit indexed*/
  589.     k16BE555PixelFormat            = 0x00000010,                    /* 16 bit BE rgb 555 (Mac)*/
  590.     k24RGBPixelFormat            = 0x00000018,                    /* 24 bit rgb */
  591.     k32ARGBPixelFormat            = 0x00000020,                    /* 32 bit argb    (Mac)*/
  592.     k1IndexedGrayPixelFormat    = 0x00000021,                    /* 1 bit indexed gray*/
  593.     k2IndexedGrayPixelFormat    = 0x00000022,                    /* 2 bit indexed gray*/
  594.     k4IndexedGrayPixelFormat    = 0x00000024,                    /* 4 bit indexed gray*/
  595.     k8IndexedGrayPixelFormat    = 0x00000028                    /* 8 bit indexed gray*/
  596. };
  597.  
  598.  
  599. /* values for PixMap.pixelFormat*/
  600.  
  601. enum {
  602.     k16LE555PixelFormat            = FOUR_CHAR_CODE('L555'),        /* 16 bit LE rgb 555 (PC)*/
  603.     k16BE565PixelFormat            = FOUR_CHAR_CODE('B565'),        /* 16 bit BE rgb 565*/
  604.     k16LE565PixelFormat            = FOUR_CHAR_CODE('L565'),        /* 16 bit LE rgb 565*/
  605.     k24BGRPixelFormat            = FOUR_CHAR_CODE('24BG'),        /* 24 bit bgr */
  606.     k32BGRAPixelFormat            = FOUR_CHAR_CODE('BGRA'),        /* 32 bit bgra    (Matrox)*/
  607.     k32ABGRPixelFormat            = FOUR_CHAR_CODE('ABGR'),        /* 32 bit abgr    */
  608.     k32RGBAPixelFormat            = FOUR_CHAR_CODE('RGBA'),        /* 32 bit rgba    */
  609.     kYUVSPixelFormat            = FOUR_CHAR_CODE('yuvs'),        /* YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'*/
  610.     kYUVUPixelFormat            = FOUR_CHAR_CODE('yuvu'),        /* YUV 4:2:2 byte ordering 16-signed*/
  611.     kYVU9PixelFormat            = FOUR_CHAR_CODE('YVU9'),        /* YVU9 Planar    9*/
  612.     kYUV411PixelFormat            = FOUR_CHAR_CODE('Y411'),        /* YUV 4:1:1 Interleaved    16*/
  613.     kYVYU422PixelFormat            = FOUR_CHAR_CODE('YVYU'),        /* YVYU 4:2:2 byte ordering    16*/
  614.     kUYVY422PixelFormat            = FOUR_CHAR_CODE('UYVY'),        /* UYVY 4:2:2 byte ordering    16*/
  615.     kYUV211PixelFormat            = FOUR_CHAR_CODE('Y211')        /* YUV 2:1:1 Packed    8*/
  616. };
  617.  
  618.  
  619. #if !OLDPIXMAPSTRUCT
  620.  
  621. struct PixMapExtension {
  622.     long                             extSize;                    /*size of struct, duh!*/
  623.     unsigned long                     pmBits;                        /*pixmap attributes bitfield*/
  624.     void *                            pmGD;                        /*this is a GDHandle*/
  625.     long                             pmSeed;
  626.     unsigned long                     reserved0;                    /*reserved for future use*/
  627.     unsigned long                     reserved1;
  628.     unsigned long                     reserved2;
  629.     long                             longRowBytes;                /*used when rowBytes > 16382*/
  630. };
  631. typedef struct PixMapExtension            PixMapExtension;
  632.  
  633. typedef PixMapExtension *                PixMapExtPtr;
  634. typedef PixMapExtPtr *                    PixMapExtHandle;
  635. #endif  /* !OLDPIXMAPSTRUCT */
  636.  
  637.  
  638. struct PixMap {
  639.     Ptr                             baseAddr;                    /*pointer to pixels*/
  640.     short                             rowBytes;                    /*offset to next line*/
  641.     Rect                             bounds;                        /*encloses bitmap*/
  642.     short                             pmVersion;                    /*pixMap version number*/
  643.     short                             packType;                    /*defines packing format*/
  644.     long                             packSize;                    /*length of pixel data*/
  645.     Fixed                             hRes;                        /*horiz. resolution (ppi)*/
  646.     Fixed                             vRes;                        /*vert. resolution (ppi)*/
  647.     short                             pixelType;                    /*defines pixel type*/
  648.     short                             pixelSize;                    /*# bits in pixel*/
  649.     short                             cmpCount;                    /*# components in pixel*/
  650.     short                             cmpSize;                    /*# bits per component*/
  651. #if OLDPIXMAPSTRUCT
  652.     long                             planeBytes;                    /*offset to next plane*/
  653.     CTabHandle                         pmTable;                    /*color map for this pixMap*/
  654.     long                             pmReserved;
  655. #else
  656.     OSType                             pixelFormat;                /*fourCharCode representation*/
  657.     CTabHandle                         pmTable;                    /*color map for this pixMap*/
  658.     PixMapExtHandle                    pmExt;                        /*Handle to pixMap extension*/
  659. #endif
  660. };
  661. typedef struct PixMap                    PixMap;
  662. typedef PixMap *                        PixMapPtr;
  663. typedef PixMapPtr *                        PixMapHandle;
  664.  
  665. struct PixPat {
  666.     short                             patType;                    /*type of pattern*/
  667.     PixMapHandle                     patMap;                        /*the pattern's pixMap*/
  668.     Handle                             patData;                    /*pixmap's data*/
  669.     Handle                             patXData;                    /*expanded Pattern data*/
  670.     short                             patXValid;                    /*flags whether expanded Pattern valid*/
  671.     Handle                             patXMap;                    /*Handle to expanded Pattern data*/
  672.     Pattern                         pat1Data;                    /*old-Style pattern/RGB color*/
  673. };
  674. typedef struct PixPat                    PixPat;
  675. typedef PixPat *                        PixPatPtr;
  676. typedef PixPatPtr *                        PixPatHandle;
  677.  
  678. struct CCrsr {
  679.     short                             crsrType;                    /*type of cursor*/
  680.     PixMapHandle                     crsrMap;                    /*the cursor's pixmap*/
  681.     Handle                             crsrData;                    /*cursor's data*/
  682.     Handle                             crsrXData;                    /*expanded cursor data*/
  683.     short                             crsrXValid;                    /*depth of expanded data (0 if none)*/
  684.     Handle                             crsrXHandle;                /*future use*/
  685.     Bits16                             crsr1Data;                    /*one-bit cursor*/
  686.     Bits16                             crsrMask;                    /*cursor's mask*/
  687.     Point                             crsrHotSpot;                /*cursor's hotspot*/
  688.     long                             crsrXTable;                    /*private*/
  689.     long                             crsrID;                        /*private*/
  690. };
  691. typedef struct CCrsr                    CCrsr;
  692. typedef CCrsr *                            CCrsrPtr;
  693. typedef CCrsrPtr *                        CCrsrHandle;
  694. #if OLDROUTINELOCATIONS
  695.  
  696. struct CIcon {
  697.     PixMap                             iconPMap;                    /*the icon's pixMap*/
  698.     BitMap                             iconMask;                    /*the icon's mask*/
  699.     BitMap                             iconBMap;                    /*the icon's bitMap*/
  700.     Handle                             iconData;                    /*the icon's data*/
  701.     short                             iconMaskData[1];            /*icon's mask and BitMap data*/
  702. };
  703. typedef struct CIcon                    CIcon;
  704. typedef CIcon *                            CIconPtr;
  705. typedef CIconPtr *                        CIconHandle;
  706. #endif  /* OLDROUTINELOCATIONS */
  707.  
  708.  
  709. struct GammaTbl {
  710.     short                             gVersion;                    /*gamma version number*/
  711.     short                             gType;                        /*gamma data type*/
  712.     short                             gFormulaSize;                /*Formula data size*/
  713.     short                             gChanCnt;                    /*number of channels of data*/
  714.     short                             gDataCnt;                    /*number of values/channel*/
  715.     short                             gDataWidth;                    /*bits/corrected value (data packed to next larger byte size)*/
  716.     short                             gFormulaData[1];            /*data for formulas followed by gamma values*/
  717. };
  718. typedef struct GammaTbl                    GammaTbl;
  719. typedef GammaTbl *                        GammaTblPtr;
  720. typedef GammaTblPtr *                    GammaTblHandle;
  721.  
  722. struct ITab {
  723.     long                             iTabSeed;                    /*copy of CTSeed from source CTable*/
  724.     short                             iTabRes;                    /*bits/channel resolution of iTable*/
  725.     Byte                             iTTable[1];                    /*byte colortable index values*/
  726. };
  727. typedef struct ITab                        ITab;
  728. typedef ITab *                            ITabPtr;
  729. typedef ITabPtr *                        ITabHandle;
  730.  
  731. struct SProcRec {
  732.     Handle                             nxtSrch;                    /*SProcHndl Handle to next SProcRec*/
  733.     ColorSearchUPP                     srchProc;                    /*search procedure proc ptr*/
  734. };
  735. typedef struct SProcRec                    SProcRec;
  736.  
  737. typedef SProcRec *                        SProcPtr;
  738. typedef SProcPtr *                        SProcHndl;
  739.  
  740. struct CProcRec {
  741.     Handle                             nxtComp;                    /*CProcHndl Handle to next CProcRec*/
  742.     ColorComplementUPP                 compProc;                    /*complement procedure proc ptr*/
  743. };
  744. typedef struct CProcRec                    CProcRec;
  745.  
  746. typedef CProcRec *                        CProcPtr;
  747. typedef CProcPtr *                        CProcHndl;
  748. /*
  749.     QuickTime 3.0 makes GDevice data structure available on non-Mac OS's.
  750.     In order to implement GDevice in these alternate environments, the GDevice
  751.     had to be extended. The gdReserved field was changed to gdExt which is
  752.     a Handle to extra info.  
  753. */
  754. #ifndef OLDGDEVICESTRUCT
  755. #if TARGET_OS_MAC
  756. #define OLDGDEVICESTRUCT 1
  757. #else
  758. #define OLDGDEVICESTRUCT 0
  759. #endif  /* TARGET_OS_MAC */
  760.  
  761. #endif  /* !defined(OLDGDEVICESTRUCT) */
  762.  
  763. typedef struct GDevice                     GDevice;
  764. typedef GDevice *                        GDPtr;
  765. typedef GDPtr *                            GDHandle;
  766.  
  767. struct GDevice {
  768.     short                             gdRefNum;                    /*driver's unit number*/
  769.     short                             gdID;                        /*client ID for search procs*/
  770.     short                             gdType;                        /*fixed/CLUT/direct*/
  771.     ITabHandle                         gdITable;                    /*Handle to inverse lookup table*/
  772.     short                             gdResPref;                    /*preferred resolution of GDITable*/
  773.     SProcHndl                         gdSearchProc;                /*search proc list head*/
  774.     CProcHndl                         gdCompProc;                    /*complement proc list*/
  775.     short                             gdFlags;                    /*grafDevice flags word*/
  776.     PixMapHandle                     gdPMap;                        /*describing pixMap*/
  777.     long                             gdRefCon;                    /*reference value*/
  778.     GDHandle                         gdNextGD;                    /*GDHandle Handle of next gDevice*/
  779.     Rect                             gdRect;                        /* device's bounds in global coordinates*/
  780.     long                             gdMode;                        /*device's current mode*/
  781.     short                             gdCCBytes;                    /*depth of expanded cursor data*/
  782.     short                             gdCCDepth;                    /*depth of expanded cursor data*/
  783.     Handle                             gdCCXData;                    /*Handle to cursor's expanded data*/
  784.     Handle                             gdCCXMask;                    /*Handle to cursor's expanded mask*/
  785. #if OLDGDEVICESTRUCT
  786.     long                             gdReserved;                    /*future use. MUST BE 0*/
  787. #else
  788.     Handle                             gdExt;                        /*QuickTime 3.0 private info*/
  789. #endif
  790. };
  791.  
  792.  
  793. struct GrafVars {
  794.     RGBColor                         rgbOpColor;                    /*color for addPin  subPin and average*/
  795.     RGBColor                         rgbHiliteColor;                /*color for hiliting*/
  796.     Handle                             pmFgColor;                    /*palette Handle for foreground color*/
  797.     short                             pmFgIndex;                    /*index value for foreground*/
  798.     Handle                             pmBkColor;                    /*palette Handle for background color*/
  799.     short                             pmBkIndex;                    /*index value for background*/
  800.     short                             pmFlags;                    /*flags for Palette Manager*/
  801. };
  802. typedef struct GrafVars                    GrafVars;
  803.  
  804. typedef GrafVars *                        GVarPtr;
  805. typedef GVarPtr *                        GVarHandle;
  806.  
  807. typedef struct CGrafPort                 CGrafPort;
  808. typedef CGrafPort *                        CGrafPtr;
  809. typedef CALLBACK_API_C( OSStatus , QDPrinterStatusProcPtr )(PrinterStatusOpcode opcode, CGrafPtr currentPort, void *printerStatus);
  810. typedef STACK_UPP_TYPE(QDPrinterStatusProcPtr)                     QDPrinterStatusUPP;
  811.  
  812.  
  813. struct CQDProcs {
  814.     QDTextUPP                         textProc;
  815.     QDLineUPP                         lineProc;
  816.     QDRectUPP                         rectProc;
  817.     QDRRectUPP                         rRectProc;
  818.     QDOvalUPP                         ovalProc;
  819.     QDArcUPP                         arcProc;
  820.     QDPolyUPP                         polyProc;
  821.     QDRgnUPP                         rgnProc;
  822.     QDBitsUPP                         bitsProc;
  823.     QDCommentUPP                     commentProc;
  824.     QDTxMeasUPP                     txMeasProc;
  825.     QDGetPicUPP                     getPicProc;
  826.     QDPutPicUPP                     putPicProc;
  827.     QDOpcodeUPP                     opcodeProc;
  828.     UniversalProcPtr                 newProc1;                    /* this is the StdPix bottleneck -- see ImageCompression.h */
  829.     QDStdGlyphsUPP                     glyphsProc;                    /* was newProc2; now used in Unicode text drawing */
  830.     QDPrinterStatusUPP                 printerStatusProc;            /* was newProc3;  now used to communicate status between Printing code and System imaging code */
  831.     UniversalProcPtr                 newProc4;
  832.     UniversalProcPtr                 newProc5;
  833.     UniversalProcPtr                 newProc6;
  834. };
  835. typedef struct CQDProcs                    CQDProcs;
  836. typedef CQDProcs *                        CQDProcsPtr;
  837.  
  838. struct CGrafPort {
  839.     short                             device;
  840.     PixMapHandle                     portPixMap;                    /*port's pixel map*/
  841.     short                             portVersion;                /*high 2 bits always set*/
  842.     Handle                             grafVars;                    /*Handle to more fields*/
  843.     short                             chExtra;                    /*character extra*/
  844.     short                             pnLocHFrac;                    /*pen fraction*/
  845.     Rect                             portRect;
  846.     RgnHandle                         visRgn;
  847.     RgnHandle                         clipRgn;
  848.     PixPatHandle                     bkPixPat;                    /*background pattern*/
  849.     RGBColor                         rgbFgColor;                    /*RGB components of fg*/
  850.     RGBColor                         rgbBkColor;                    /*RGB components of bk*/
  851.     Point                             pnLoc;
  852.     Point                             pnSize;
  853.     short                             pnMode;
  854.     PixPatHandle                     pnPixPat;                    /*pen's pattern*/
  855.     PixPatHandle                     fillPixPat;                    /*fill pattern*/
  856.     short                             pnVis;
  857.     short                             txFont;
  858.     StyleField                         txFace;                        /*StyleField occupies 16-bits, but only first 8-bits are used*/
  859.     short                             txMode;
  860.     short                             txSize;
  861.     Fixed                             spExtra;
  862.     long                             fgColor;
  863.     long                             bkColor;
  864.     short                             colrBit;
  865.     short                             patStretch;
  866.     Handle                             picSave;
  867.     Handle                             rgnSave;
  868.     Handle                             polySave;
  869.     CQDProcsPtr                     grafProcs;
  870. };
  871.  
  872.  
  873. typedef CGrafPtr                         CWindowPtr;
  874.  
  875. struct ReqListRec {
  876.     short                             reqLSize;                    /*request list size*/
  877.     short                             reqLData[1];                /*request list data*/
  878. };
  879. typedef struct ReqListRec                ReqListRec;
  880.  
  881. struct OpenCPicParams {
  882.     Rect                             srcRect;
  883.     Fixed                             hRes;
  884.     Fixed                             vRes;
  885.     short                             version;
  886.     short                             reserved1;
  887.     long                             reserved2;
  888. };
  889. typedef struct OpenCPicParams            OpenCPicParams;
  890.  
  891. enum {
  892.     kCursorImageMajorVersion    = 0x0001,
  893.     kCursorImageMinorVersion    = 0x0000
  894. };
  895.  
  896.  
  897. struct CursorImageRec {
  898.     UInt16                             majorVersion;
  899.     UInt16                             minorVersion;
  900.     PixMapHandle                     cursorPixMap;
  901.     BitMapHandle                     cursorBitMask;
  902. };
  903. typedef struct CursorImageRec            CursorImageRec;
  904.  
  905. typedef CursorImageRec *                CursorImagePtr;
  906. typedef CALLBACK_API( void , DeviceLoopDrawingProcPtr )(short depth, short deviceFlags, GDHandle targetDevice, long userData);
  907. typedef STACK_UPP_TYPE(DeviceLoopDrawingProcPtr)                 DeviceLoopDrawingUPP;
  908. enum { uppDeviceLoopDrawingProcInfo = 0x00003E80 };             /* pascal no_return_value Func(2_bytes, 2_bytes, 4_bytes, 4_bytes) */
  909. #define NewDeviceLoopDrawingProc(userRoutine)                     (DeviceLoopDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDeviceLoopDrawingProcInfo, GetCurrentArchitecture())
  910. #define CallDeviceLoopDrawingProc(userRoutine, depth, deviceFlags, targetDevice, userData)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppDeviceLoopDrawingProcInfo, (depth), (deviceFlags), (targetDevice), (userData))
  911.  
  912. struct QDGlobals {
  913.     char                             privates[76];
  914.     long                             randSeed;
  915.     BitMap                             screenBits;
  916.     Cursor                             arrow;
  917.     Pattern                         dkGray;
  918.     Pattern                         ltGray;
  919.     Pattern                         gray;
  920.     Pattern                         black;
  921.     Pattern                         white;
  922.     GrafPtr                         thePort;
  923. };
  924. typedef struct QDGlobals                QDGlobals;
  925. typedef QDGlobals *                        QDGlobalsPtr;
  926. typedef QDGlobalsPtr *                    QDGlobalsHdl;
  927. extern QDGlobals qd;
  928.  
  929.  
  930.  
  931. EXTERN_API( void )
  932. InitGraf                        (void *                    globalPtr)                            ONEWORDINLINE(0xA86E);
  933.  
  934. EXTERN_API( void )
  935. OpenPort                        (GrafPtr                 port)                                ONEWORDINLINE(0xA86F);
  936.  
  937. EXTERN_API( void )
  938. InitPort                        (GrafPtr                 port)                                ONEWORDINLINE(0xA86D);
  939.  
  940. EXTERN_API( void )
  941. ClosePort                        (GrafPtr                 port)                                ONEWORDINLINE(0xA87D);
  942.  
  943. #if !TARGET_OS_MAC
  944. EXTERN_API( OSErr )
  945. LockPortBits                    (GrafPtr                 port);
  946.  
  947. EXTERN_API( OSErr )
  948. UnlockPortBits                    (GrafPtr                 port);
  949.  
  950. EXTERN_API( OSErr )
  951. UpdatePort                        (GrafPtr                 port);
  952.  
  953. EXTERN_API( void *)
  954. GetPortNativeWindow                (GrafPtr                 macPort);
  955.  
  956. EXTERN_API( GrafPtr )
  957. GetNativeWindowPort                (void *                    nativeWindow);
  958.  
  959. EXTERN_API( void *)
  960. MacRegionToNativeRegion            (RgnHandle                 macRegion);
  961.  
  962. EXTERN_API( RgnHandle )
  963. NativeRegionToMacRegion            (void *                    nativeRegion);
  964.  
  965. #if TARGET_OS_WIN32
  966. EXTERN_API( void *)
  967. GetPortHWND                        (GrafPtr                 port);
  968.  
  969. EXTERN_API( GrafPtr )
  970. GetHWNDPort                        (void *                    theHWND);
  971.  
  972. #define GetPortHWND(port)  GetPortNativeWindow(port)
  973. #define GetHWNDPort(theHWND) GetNativeWindowPort(theHWND)
  974. EXTERN_API( void *)
  975. GetPortHDC                        (GrafPtr                 port);
  976.  
  977. EXTERN_API( void *)
  978. GetPortHBITMAP                    (GrafPtr                 port);
  979.  
  980. EXTERN_API( void *)
  981. GetPortHPALETTE                    (GrafPtr                 port);
  982.  
  983. EXTERN_API( void *)
  984. GetPortHFONT                    (GrafPtr                 port);
  985.  
  986. EXTERN_API( void *)
  987. GetDIBFromPICT                    (PicHandle                 hPict);
  988.  
  989. EXTERN_API( PicHandle )
  990. GetPICTFromDIB                    (void *                    h);
  991.  
  992. #endif  /* TARGET_OS_WIN32 */
  993.  
  994. #endif  /* !TARGET_OS_MAC */
  995.  
  996.  
  997. #if TARGET_OS_MAC
  998.     #define MacSetPort SetPort
  999. #endif
  1000. EXTERN_API( void )
  1001. MacSetPort                        (GrafPtr                 port)                                ONEWORDINLINE(0xA873);
  1002.  
  1003. EXTERN_API( void )
  1004. GetPort                            (GrafPtr *                port)                                ONEWORDINLINE(0xA874);
  1005.  
  1006. EXTERN_API( void )
  1007. GrafDevice                        (short                     device)                                ONEWORDINLINE(0xA872);
  1008.  
  1009. EXTERN_API( void )
  1010. SetPortBits                        (const BitMap *            bm)                                    ONEWORDINLINE(0xA875);
  1011.  
  1012. EXTERN_API( void )
  1013. PortSize                        (short                     width,
  1014.                                  short                     height)                                ONEWORDINLINE(0xA876);
  1015.  
  1016. EXTERN_API( void )
  1017. MovePortTo                        (short                     leftGlobal,
  1018.                                  short                     topGlobal)                            ONEWORDINLINE(0xA877);
  1019.  
  1020. EXTERN_API( void )
  1021. SetOrigin                        (short                     h,
  1022.                                  short                     v)                                    ONEWORDINLINE(0xA878);
  1023.  
  1024. EXTERN_API( void )
  1025. SetClip                            (RgnHandle                 rgn)                                ONEWORDINLINE(0xA879);
  1026.  
  1027. EXTERN_API( void )
  1028. GetClip                            (RgnHandle                 rgn)                                ONEWORDINLINE(0xA87A);
  1029.  
  1030. EXTERN_API( void )
  1031. ClipRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA87B);
  1032.  
  1033. EXTERN_API( void )
  1034. BackPat                            (const Pattern *        pat)                                ONEWORDINLINE(0xA87C);
  1035.  
  1036. EXTERN_API( void )
  1037. InitCursor                        (void)                                                        ONEWORDINLINE(0xA850);
  1038.  
  1039. #if TARGET_OS_MAC
  1040.     #define MacSetCursor SetCursor
  1041. #endif
  1042. EXTERN_API( void )
  1043. MacSetCursor                    (const Cursor *            crsr)                                ONEWORDINLINE(0xA851);
  1044.  
  1045. EXTERN_API( void )
  1046. HideCursor                        (void)                                                        ONEWORDINLINE(0xA852);
  1047.  
  1048. #if TARGET_OS_MAC
  1049.     #define MacShowCursor ShowCursor
  1050. #endif
  1051. EXTERN_API( void )
  1052. MacShowCursor                    (void)                                                        ONEWORDINLINE(0xA853);
  1053.  
  1054. EXTERN_API( void )
  1055. ObscureCursor                    (void)                                                        ONEWORDINLINE(0xA856);
  1056.  
  1057. EXTERN_API( void )
  1058. HidePen                            (void)                                                        ONEWORDINLINE(0xA896);
  1059.  
  1060. EXTERN_API( void )
  1061. ShowPen                            (void)                                                        ONEWORDINLINE(0xA897);
  1062.  
  1063. EXTERN_API( void )
  1064. GetPen                            (Point *                pt)                                    ONEWORDINLINE(0xA89A);
  1065.  
  1066. EXTERN_API( void )
  1067. GetPenState                        (PenState *                pnState)                            ONEWORDINLINE(0xA898);
  1068.  
  1069. EXTERN_API( void )
  1070. SetPenState                        (const PenState *        pnState)                            ONEWORDINLINE(0xA899);
  1071.  
  1072. EXTERN_API( void )
  1073. PenSize                            (short                     width,
  1074.                                  short                     height)                                ONEWORDINLINE(0xA89B);
  1075.  
  1076. EXTERN_API( void )
  1077. PenMode                            (short                     mode)                                ONEWORDINLINE(0xA89C);
  1078.  
  1079. EXTERN_API( void )
  1080. PenPat                            (const Pattern *        pat)                                ONEWORDINLINE(0xA89D);
  1081.  
  1082. EXTERN_API( void )
  1083. PenNormal                        (void)                                                        ONEWORDINLINE(0xA89E);
  1084.  
  1085. EXTERN_API( void )
  1086. MoveTo                            (short                     h,
  1087.                                  short                     v)                                    ONEWORDINLINE(0xA893);
  1088.  
  1089. EXTERN_API( void )
  1090. Move                            (short                     dh,
  1091.                                  short                     dv)                                    ONEWORDINLINE(0xA894);
  1092.  
  1093. #if TARGET_OS_MAC
  1094.     #define MacLineTo LineTo
  1095. #endif
  1096. EXTERN_API( void )
  1097. MacLineTo                        (short                     h,
  1098.                                  short                     v)                                    ONEWORDINLINE(0xA891);
  1099.  
  1100. EXTERN_API( void )
  1101. Line                            (short                     dh,
  1102.                                  short                     dv)                                    ONEWORDINLINE(0xA892);
  1103.  
  1104. EXTERN_API( void )
  1105. ForeColor                        (long                     color)                                ONEWORDINLINE(0xA862);
  1106.  
  1107. EXTERN_API( void )
  1108. BackColor                        (long                     color)                                ONEWORDINLINE(0xA863);
  1109.  
  1110. EXTERN_API( void )
  1111. ColorBit                        (short                     whichBit)                            ONEWORDINLINE(0xA864);
  1112.  
  1113. #if TARGET_OS_MAC
  1114.     #define MacSetRect SetRect
  1115. #endif
  1116. EXTERN_API( void )
  1117. MacSetRect                        (Rect *                    r,
  1118.                                  short                     left,
  1119.                                  short                     top,
  1120.                                  short                     right,
  1121.                                  short                     bottom)                                ONEWORDINLINE(0xA8A7);
  1122.  
  1123. #if TARGET_OS_MAC
  1124.     #define MacOffsetRect OffsetRect
  1125. #endif
  1126. EXTERN_API( void )
  1127. MacOffsetRect                    (Rect *                    r,
  1128.                                  short                     dh,
  1129.                                  short                     dv)                                    ONEWORDINLINE(0xA8A8);
  1130.  
  1131. #if TARGET_OS_MAC
  1132.     #define MacInsetRect InsetRect
  1133. #endif
  1134. EXTERN_API( void )
  1135. MacInsetRect                    (Rect *                    r,
  1136.                                  short                     dh,
  1137.                                  short                     dv)                                    ONEWORDINLINE(0xA8A9);
  1138.  
  1139. EXTERN_API( Boolean )
  1140. SectRect                        (const Rect *            src1,
  1141.                                  const Rect *            src2,
  1142.                                  Rect *                    dstRect)                            ONEWORDINLINE(0xA8AA);
  1143.  
  1144. #if TARGET_OS_MAC
  1145.     #define MacUnionRect UnionRect
  1146. #endif
  1147. EXTERN_API( void )
  1148. MacUnionRect                    (const Rect *            src1,
  1149.                                  const Rect *            src2,
  1150.                                  Rect *                    dstRect)                            ONEWORDINLINE(0xA8AB);
  1151.  
  1152. #if TARGET_OS_MAC
  1153.     #define MacEqualRect EqualRect
  1154. #endif
  1155. EXTERN_API( Boolean )
  1156. MacEqualRect                    (const Rect *            rect1,
  1157.                                  const Rect *            rect2)                                ONEWORDINLINE(0xA8A6);
  1158.  
  1159. EXTERN_API( Boolean )
  1160. EmptyRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA8AE);
  1161.  
  1162. #if TARGET_OS_MAC
  1163.     #define MacFrameRect FrameRect
  1164. #endif
  1165. EXTERN_API( void )
  1166. MacFrameRect                    (const Rect *            r)                                    ONEWORDINLINE(0xA8A1);
  1167.  
  1168. EXTERN_API( void )
  1169. PaintRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA8A2);
  1170.  
  1171. EXTERN_API( void )
  1172. EraseRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA8A3);
  1173.  
  1174. #if TARGET_OS_MAC
  1175.     #define MacInvertRect InvertRect
  1176. #endif
  1177. EXTERN_API( void )
  1178. MacInvertRect                    (const Rect *            r)                                    ONEWORDINLINE(0xA8A4);
  1179.  
  1180. #if TARGET_OS_MAC
  1181.     #define MacFillRect FillRect
  1182. #endif
  1183. EXTERN_API( void )
  1184. MacFillRect                        (const Rect *            r,
  1185.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8A5);
  1186.  
  1187. EXTERN_API( void )
  1188. FrameOval                        (const Rect *            r)                                    ONEWORDINLINE(0xA8B7);
  1189.  
  1190. EXTERN_API( void )
  1191. PaintOval                        (const Rect *            r)                                    ONEWORDINLINE(0xA8B8);
  1192.  
  1193. EXTERN_API( void )
  1194. EraseOval                        (const Rect *            r)                                    ONEWORDINLINE(0xA8B9);
  1195.  
  1196. EXTERN_API( void )
  1197. InvertOval                        (const Rect *            r)                                    ONEWORDINLINE(0xA8BA);
  1198.  
  1199. EXTERN_API( void )
  1200. FillOval                        (const Rect *            r,
  1201.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8BB);
  1202.  
  1203. EXTERN_API( void )
  1204. FrameRoundRect                    (const Rect *            r,
  1205.                                  short                     ovalWidth,
  1206.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8B0);
  1207.  
  1208. EXTERN_API( void )
  1209. PaintRoundRect                    (const Rect *            r,
  1210.                                  short                     ovalWidth,
  1211.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8B1);
  1212.  
  1213. EXTERN_API( void )
  1214. EraseRoundRect                    (const Rect *            r,
  1215.                                  short                     ovalWidth,
  1216.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8B2);
  1217.  
  1218. EXTERN_API( void )
  1219. InvertRoundRect                    (const Rect *            r,
  1220.                                  short                     ovalWidth,
  1221.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8B3);
  1222.  
  1223. EXTERN_API( void )
  1224. FillRoundRect                    (const Rect *            r,
  1225.                                  short                     ovalWidth,
  1226.                                  short                     ovalHeight,
  1227.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8B4);
  1228.  
  1229. EXTERN_API( void )
  1230. FrameArc                        (const Rect *            r,
  1231.                                  short                     startAngle,
  1232.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8BE);
  1233.  
  1234. EXTERN_API( void )
  1235. PaintArc                        (const Rect *            r,
  1236.                                  short                     startAngle,
  1237.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8BF);
  1238.  
  1239. EXTERN_API( void )
  1240. EraseArc                        (const Rect *            r,
  1241.                                  short                     startAngle,
  1242.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8C0);
  1243.  
  1244. EXTERN_API( void )
  1245. InvertArc                        (const Rect *            r,
  1246.                                  short                     startAngle,
  1247.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8C1);
  1248.  
  1249. EXTERN_API( void )
  1250. FillArc                            (const Rect *            r,
  1251.                                  short                     startAngle,
  1252.                                  short                     arcAngle,
  1253.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8C2);
  1254.  
  1255. EXTERN_API( RgnHandle )
  1256. NewRgn                            (void)                                                        ONEWORDINLINE(0xA8D8);
  1257.  
  1258. EXTERN_API( void )
  1259. OpenRgn                            (void)                                                        ONEWORDINLINE(0xA8DA);
  1260.  
  1261. EXTERN_API( void )
  1262. CloseRgn                        (RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8DB);
  1263.  
  1264. EXTERN_API( OSErr )
  1265. BitMapToRegion                    (RgnHandle                 region,
  1266.                                  const BitMap *            bMap)                                ONEWORDINLINE(0xA8D7);
  1267.  
  1268. EXTERN_API( void )
  1269. DisposeRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D9);
  1270.  
  1271. #if TARGET_OS_MAC
  1272.     #define MacCopyRgn CopyRgn
  1273. #endif
  1274. EXTERN_API( void )
  1275. MacCopyRgn                        (RgnHandle                 srcRgn,
  1276.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8DC);
  1277.  
  1278. EXTERN_API( void )
  1279. SetEmptyRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8DD);
  1280.  
  1281. #if TARGET_OS_MAC
  1282.     #define MacSetRectRgn SetRectRgn
  1283. #endif
  1284. EXTERN_API( void )
  1285. MacSetRectRgn                    (RgnHandle                 rgn,
  1286.                                  short                     left,
  1287.                                  short                     top,
  1288.                                  short                     right,
  1289.                                  short                     bottom)                                ONEWORDINLINE(0xA8DE);
  1290.  
  1291. EXTERN_API( void )
  1292. RectRgn                            (RgnHandle                 rgn,
  1293.                                  const Rect *            r)                                    ONEWORDINLINE(0xA8DF);
  1294.  
  1295. #if TARGET_OS_MAC
  1296.     #define MacOffsetRgn OffsetRgn
  1297. #endif
  1298. EXTERN_API( void )
  1299. MacOffsetRgn                    (RgnHandle                 rgn,
  1300.                                  short                     dh,
  1301.                                  short                     dv)                                    ONEWORDINLINE(0xA8E0);
  1302.  
  1303. EXTERN_API( void )
  1304. InsetRgn                        (RgnHandle                 rgn,
  1305.                                  short                     dh,
  1306.                                  short                     dv)                                    ONEWORDINLINE(0xA8E1);
  1307.  
  1308. EXTERN_API( void )
  1309. SectRgn                            (RgnHandle                 srcRgnA,
  1310.                                  RgnHandle                 srcRgnB,
  1311.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8E4);
  1312.  
  1313. #if TARGET_OS_MAC
  1314.     #define MacUnionRgn UnionRgn
  1315. #endif
  1316. EXTERN_API( void )
  1317. MacUnionRgn                        (RgnHandle                 srcRgnA,
  1318.                                  RgnHandle                 srcRgnB,
  1319.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8E5);
  1320.  
  1321. EXTERN_API( void )
  1322. DiffRgn                            (RgnHandle                 srcRgnA,
  1323.                                  RgnHandle                 srcRgnB,
  1324.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8E6);
  1325.  
  1326. #if TARGET_OS_MAC
  1327.     #define MacXorRgn XorRgn
  1328. #endif
  1329. EXTERN_API( void )
  1330. MacXorRgn                        (RgnHandle                 srcRgnA,
  1331.                                  RgnHandle                 srcRgnB,
  1332.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8E7);
  1333.  
  1334. EXTERN_API( Boolean )
  1335. RectInRgn                        (const Rect *            r,
  1336.                                  RgnHandle                 rgn)                                ONEWORDINLINE(0xA8E9);
  1337.  
  1338. #if TARGET_OS_MAC
  1339.     #define MacEqualRgn EqualRgn
  1340. #endif
  1341. EXTERN_API( Boolean )
  1342. MacEqualRgn                        (RgnHandle                 rgnA,
  1343.                                  RgnHandle                 rgnB)                                ONEWORDINLINE(0xA8E3);
  1344.  
  1345. EXTERN_API( Boolean )
  1346. EmptyRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8E2);
  1347.  
  1348. #if TARGET_OS_MAC
  1349.     #define MacFrameRgn FrameRgn
  1350. #endif
  1351. EXTERN_API( void )
  1352. MacFrameRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D2);
  1353.  
  1354. #if TARGET_OS_MAC
  1355.     #define MacPaintRgn PaintRgn
  1356. #endif
  1357. EXTERN_API( void )
  1358. MacPaintRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D3);
  1359.  
  1360. EXTERN_API( void )
  1361. EraseRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D4);
  1362.  
  1363. #if TARGET_OS_MAC
  1364.     #define MacInvertRgn InvertRgn
  1365. #endif
  1366. EXTERN_API( void )
  1367. MacInvertRgn                    (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D5);
  1368.  
  1369. #if TARGET_OS_MAC
  1370.     #define MacFillRgn FillRgn
  1371. #endif
  1372. EXTERN_API( void )
  1373. MacFillRgn                        (RgnHandle                 rgn,
  1374.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8D6);
  1375.  
  1376. EXTERN_API( void )
  1377. ScrollRect                        (const Rect *            r,
  1378.                                  short                     dh,
  1379.                                  short                     dv,
  1380.                                  RgnHandle                 updateRgn)                            ONEWORDINLINE(0xA8EF);
  1381.  
  1382. EXTERN_API( void )
  1383. CopyBits                        (const BitMap *            srcBits,
  1384.                                  const BitMap *            dstBits,
  1385.                                  const Rect *            srcRect,
  1386.                                  const Rect *            dstRect,
  1387.                                  short                     mode,
  1388.                                  RgnHandle                 maskRgn) /* can be NULL */            ONEWORDINLINE(0xA8EC);
  1389.  
  1390. EXTERN_API( void )
  1391. SeedFill                        (const void *            srcPtr,
  1392.                                  void *                    dstPtr,
  1393.                                  short                     srcRow,
  1394.                                  short                     dstRow,
  1395.                                  short                     height,
  1396.                                  short                     words,
  1397.                                  short                     seedH,
  1398.                                  short                     seedV)                                ONEWORDINLINE(0xA839);
  1399.  
  1400. EXTERN_API( void )
  1401. CalcMask                        (const void *            srcPtr,
  1402.                                  void *                    dstPtr,
  1403.                                  short                     srcRow,
  1404.                                  short                     dstRow,
  1405.                                  short                     height,
  1406.                                  short                     words)                                ONEWORDINLINE(0xA838);
  1407.  
  1408. EXTERN_API( void )
  1409. CopyMask                        (const BitMap *            srcBits,
  1410.                                  const BitMap *            maskBits,
  1411.                                  const BitMap *            dstBits,
  1412.                                  const Rect *            srcRect,
  1413.                                  const Rect *            maskRect,
  1414.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA817);
  1415.  
  1416. EXTERN_API( PicHandle )
  1417. OpenPicture                        (const Rect *            picFrame)                            ONEWORDINLINE(0xA8F3);
  1418.  
  1419. EXTERN_API( void )
  1420. PicComment                        (short                     kind,
  1421.                                  short                     dataSize,
  1422.                                  Handle                 dataHandle)                            ONEWORDINLINE(0xA8F2);
  1423.  
  1424. EXTERN_API( void )
  1425. ClosePicture                    (void)                                                        ONEWORDINLINE(0xA8F4);
  1426.  
  1427. EXTERN_API( void )
  1428. DrawPicture                        (PicHandle                 myPicture,
  1429.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8F6);
  1430.  
  1431. EXTERN_API( void )
  1432. KillPicture                        (PicHandle                 myPicture)                            ONEWORDINLINE(0xA8F5);
  1433.  
  1434. EXTERN_API( PolyHandle )
  1435. OpenPoly                        (void)                                                        ONEWORDINLINE(0xA8CB);
  1436.  
  1437. EXTERN_API( void )
  1438. ClosePoly                        (void)                                                        ONEWORDINLINE(0xA8CC);
  1439.  
  1440. EXTERN_API( void )
  1441. KillPoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8CD);
  1442.  
  1443. EXTERN_API( void )
  1444. OffsetPoly                        (PolyHandle             poly,
  1445.                                  short                     dh,
  1446.                                  short                     dv)                                    ONEWORDINLINE(0xA8CE);
  1447.  
  1448. EXTERN_API( void )
  1449. FramePoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8C6);
  1450.  
  1451. EXTERN_API( void )
  1452. PaintPoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8C7);
  1453.  
  1454. EXTERN_API( void )
  1455. ErasePoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8C8);
  1456.  
  1457. EXTERN_API( void )
  1458. InvertPoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8C9);
  1459.  
  1460. EXTERN_API( void )
  1461. FillPoly                        (PolyHandle             poly,
  1462.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8CA);
  1463.  
  1464. EXTERN_API( void )
  1465. SetPt                            (Point *                pt,
  1466.                                  short                     h,
  1467.                                  short                     v)                                    ONEWORDINLINE(0xA880);
  1468.  
  1469. EXTERN_API( void )
  1470. LocalToGlobal                    (Point *                pt)                                    ONEWORDINLINE(0xA870);
  1471.  
  1472. EXTERN_API( void )
  1473. GlobalToLocal                    (Point *                pt)                                    ONEWORDINLINE(0xA871);
  1474.  
  1475. EXTERN_API( short )
  1476. Random                            (void)                                                        ONEWORDINLINE(0xA861);
  1477.  
  1478. EXTERN_API( void )
  1479. StuffHex                        (void *                    thingPtr,
  1480.                                  ConstStr255Param         s)                                    ONEWORDINLINE(0xA866);
  1481.  
  1482. #if TARGET_OS_MAC
  1483.     #define MacGetPixel GetPixel
  1484. #endif
  1485. EXTERN_API( Boolean )
  1486. MacGetPixel                        (short                     h,
  1487.                                  short                     v)                                    ONEWORDINLINE(0xA865);
  1488.  
  1489. EXTERN_API( void )
  1490. ScalePt                            (Point *                pt,
  1491.                                  const Rect *            srcRect,
  1492.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8F8);
  1493.  
  1494. EXTERN_API( void )
  1495. MapPt                            (Point *                pt,
  1496.                                  const Rect *            srcRect,
  1497.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8F9);
  1498.  
  1499. EXTERN_API( void )
  1500. MapRect                            (Rect *                    r,
  1501.                                  const Rect *            srcRect,
  1502.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8FA);
  1503.  
  1504. EXTERN_API( void )
  1505. MapRgn                            (RgnHandle                 rgn,
  1506.                                  const Rect *            srcRect,
  1507.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8FB);
  1508.  
  1509. EXTERN_API( void )
  1510. MapPoly                            (PolyHandle             poly,
  1511.                                  const Rect *            srcRect,
  1512.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8FC);
  1513.  
  1514. EXTERN_API( void )
  1515. SetStdProcs                        (QDProcs *                procs)                                ONEWORDINLINE(0xA8EA);
  1516.  
  1517. EXTERN_API( void )
  1518. StdRect                            (GrafVerb                 verb,
  1519.                                  const Rect *            r)                                    ONEWORDINLINE(0xA8A0);
  1520.  
  1521. EXTERN_API( void )
  1522. StdRRect                        (GrafVerb                 verb,
  1523.                                  const Rect *            r,
  1524.                                  short                     ovalWidth,
  1525.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8AF);
  1526.  
  1527. EXTERN_API( void )
  1528. StdOval                            (GrafVerb                 verb,
  1529.                                  const Rect *            r)                                    ONEWORDINLINE(0xA8B6);
  1530.  
  1531. EXTERN_API( void )
  1532. StdArc                            (GrafVerb                 verb,
  1533.                                  const Rect *            r,
  1534.                                  short                     startAngle,
  1535.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8BD);
  1536.  
  1537. EXTERN_API( void )
  1538. StdPoly                            (GrafVerb                 verb,
  1539.                                  PolyHandle             poly)                                ONEWORDINLINE(0xA8C5);
  1540.  
  1541. EXTERN_API( void )
  1542. StdRgn                            (GrafVerb                 verb,
  1543.                                  RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D1);
  1544.  
  1545. EXTERN_API( void )
  1546. StdBits                            (const BitMap *            srcBits,
  1547.                                  const Rect *            srcRect,
  1548.                                  const Rect *            dstRect,
  1549.                                  short                     mode,
  1550.                                  RgnHandle                 maskRgn)                            ONEWORDINLINE(0xA8EB);
  1551.  
  1552. EXTERN_API( void )
  1553. StdComment                        (short                     kind,
  1554.                                  short                     dataSize,
  1555.                                  Handle                 dataHandle)                            ONEWORDINLINE(0xA8F1);
  1556.  
  1557. EXTERN_API( void )
  1558. StdGetPic                        (void *                    dataPtr,
  1559.                                  short                     byteCount)                            ONEWORDINLINE(0xA8EE);
  1560.  
  1561. EXTERN_API( void )
  1562. StdPutPic                        (const void *            dataPtr,
  1563.                                  short                     byteCount)                            ONEWORDINLINE(0xA8F0);
  1564.  
  1565. EXTERN_API( void )
  1566. StdOpcode                        (const Rect *            fromRect,
  1567.                                  const Rect *            toRect,
  1568.                                  UInt16                 opcode,
  1569.                                  SInt16                 version)                            ONEWORDINLINE(0xABF8);
  1570.  
  1571. EXTERN_API( void )
  1572. AddPt                            (Point                     src,
  1573.                                  Point *                dst)                                ONEWORDINLINE(0xA87E);
  1574.  
  1575. EXTERN_API( Boolean )
  1576. EqualPt                            (Point                     pt1,
  1577.                                  Point                     pt2)                                ONEWORDINLINE(0xA881);
  1578.  
  1579. #if TARGET_OS_MAC
  1580.     #define MacPtInRect PtInRect
  1581. #endif
  1582. EXTERN_API( Boolean )
  1583. MacPtInRect                        (Point                     pt,
  1584.                                  const Rect *            r)                                    ONEWORDINLINE(0xA8AD);
  1585.  
  1586. EXTERN_API( void )
  1587. Pt2Rect                            (Point                     pt1,
  1588.                                  Point                     pt2,
  1589.                                  Rect *                    dstRect)                            ONEWORDINLINE(0xA8AC);
  1590.  
  1591. EXTERN_API( void )
  1592. PtToAngle                        (const Rect *            r,
  1593.                                  Point                     pt,
  1594.                                  short *                angle)                                ONEWORDINLINE(0xA8C3);
  1595.  
  1596. EXTERN_API( void )
  1597. SubPt                            (Point                     src,
  1598.                                  Point *                dst)                                ONEWORDINLINE(0xA87F);
  1599.  
  1600. EXTERN_API( Boolean )
  1601. PtInRgn                            (Point                     pt,
  1602.                                  RgnHandle                 rgn)                                ONEWORDINLINE(0xA8E8);
  1603.  
  1604. EXTERN_API( void )
  1605. StdLine                            (Point                     newPt)                                ONEWORDINLINE(0xA890);
  1606.  
  1607. EXTERN_API( void )
  1608. OpenCPort                        (CGrafPtr                 port)                                ONEWORDINLINE(0xAA00);
  1609.  
  1610. EXTERN_API( void )
  1611. InitCPort                        (CGrafPtr                 port)                                ONEWORDINLINE(0xAA01);
  1612.  
  1613. EXTERN_API( void )
  1614. CloseCPort                        (CGrafPtr                 port)                                ONEWORDINLINE(0xAA02);
  1615.  
  1616. EXTERN_API( PixMapHandle )
  1617. NewPixMap                        (void)                                                        ONEWORDINLINE(0xAA03);
  1618.  
  1619. EXTERN_API( void )
  1620. DisposePixMap                    (PixMapHandle             pm)                                    ONEWORDINLINE(0xAA04);
  1621.  
  1622. EXTERN_API( void )
  1623. CopyPixMap                        (PixMapHandle             srcPM,
  1624.                                  PixMapHandle             dstPM)                                ONEWORDINLINE(0xAA05);
  1625.  
  1626. EXTERN_API( PixPatHandle )
  1627. NewPixPat                        (void)                                                        ONEWORDINLINE(0xAA07);
  1628.  
  1629. EXTERN_API( void )
  1630. DisposePixPat                    (PixPatHandle             pp)                                    ONEWORDINLINE(0xAA08);
  1631.  
  1632. EXTERN_API( void )
  1633. CopyPixPat                        (PixPatHandle             srcPP,
  1634.                                  PixPatHandle             dstPP)                                ONEWORDINLINE(0xAA09);
  1635.  
  1636. EXTERN_API( void )
  1637. PenPixPat                        (PixPatHandle             pp)                                    ONEWORDINLINE(0xAA0A);
  1638.  
  1639. EXTERN_API( void )
  1640. BackPixPat                        (PixPatHandle             pp)                                    ONEWORDINLINE(0xAA0B);
  1641.  
  1642. EXTERN_API( PixPatHandle )
  1643. GetPixPat                        (short                     patID)                                ONEWORDINLINE(0xAA0C);
  1644.  
  1645. EXTERN_API( void )
  1646. MakeRGBPat                        (PixPatHandle             pp,
  1647.                                  const RGBColor *        myColor)                            ONEWORDINLINE(0xAA0D);
  1648.  
  1649. EXTERN_API( void )
  1650. FillCRect                        (const Rect *            r,
  1651.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA0E);
  1652.  
  1653. EXTERN_API( void )
  1654. FillCOval                        (const Rect *            r,
  1655.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA0F);
  1656.  
  1657. EXTERN_API( void )
  1658. FillCRoundRect                    (const Rect *            r,
  1659.                                  short                     ovalWidth,
  1660.                                  short                     ovalHeight,
  1661.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA10);
  1662.  
  1663. EXTERN_API( void )
  1664. FillCArc                        (const Rect *            r,
  1665.                                  short                     startAngle,
  1666.                                  short                     arcAngle,
  1667.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA11);
  1668.  
  1669. EXTERN_API( void )
  1670. FillCRgn                        (RgnHandle                 rgn,
  1671.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA12);
  1672.  
  1673. EXTERN_API( void )
  1674. FillCPoly                        (PolyHandle             poly,
  1675.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA13);
  1676.  
  1677. EXTERN_API( void )
  1678. RGBForeColor                    (const RGBColor *        color)                                ONEWORDINLINE(0xAA14);
  1679.  
  1680. EXTERN_API( void )
  1681. RGBBackColor                    (const RGBColor *        color)                                ONEWORDINLINE(0xAA15);
  1682.  
  1683. EXTERN_API( void )
  1684. SetCPixel                        (short                     h,
  1685.                                  short                     v,
  1686.                                  const RGBColor *        cPix)                                ONEWORDINLINE(0xAA16);
  1687.  
  1688. EXTERN_API( void )
  1689. SetPortPix                        (PixMapHandle             pm)                                    ONEWORDINLINE(0xAA06);
  1690.  
  1691. EXTERN_API( void )
  1692. GetCPixel                        (short                     h,
  1693.                                  short                     v,
  1694.                                  RGBColor *                cPix)                                ONEWORDINLINE(0xAA17);
  1695.  
  1696. EXTERN_API( void )
  1697. GetForeColor                    (RGBColor *                color)                                ONEWORDINLINE(0xAA19);
  1698.  
  1699. EXTERN_API( void )
  1700. GetBackColor                    (RGBColor *                color)                                ONEWORDINLINE(0xAA1A);
  1701.  
  1702. EXTERN_API( void )
  1703. SeedCFill                        (const BitMap *            srcBits,
  1704.                                  const BitMap *            dstBits,
  1705.                                  const Rect *            srcRect,
  1706.                                  const Rect *            dstRect,
  1707.                                  short                     seedH,
  1708.                                  short                     seedV,
  1709.                                  ColorSearchUPP         matchProc,
  1710.                                  long                     matchData)                            ONEWORDINLINE(0xAA50);
  1711.  
  1712. EXTERN_API( void )
  1713. CalcCMask                        (const BitMap *            srcBits,
  1714.                                  const BitMap *            dstBits,
  1715.                                  const Rect *            srcRect,
  1716.                                  const Rect *            dstRect,
  1717.                                  const RGBColor *        seedRGB,
  1718.                                  ColorSearchUPP         matchProc,
  1719.                                  long                     matchData)                            ONEWORDINLINE(0xAA4F);
  1720.  
  1721. EXTERN_API( PicHandle )
  1722. OpenCPicture                    (const OpenCPicParams *    newHeader)                            ONEWORDINLINE(0xAA20);
  1723.  
  1724. EXTERN_API( void )
  1725. OpColor                            (const RGBColor *        color)                                ONEWORDINLINE(0xAA21);
  1726.  
  1727. EXTERN_API( void )
  1728. HiliteColor                        (const RGBColor *        color)                                ONEWORDINLINE(0xAA22);
  1729.  
  1730. EXTERN_API( void )
  1731. DisposeCTable                    (CTabHandle             cTable)                                ONEWORDINLINE(0xAA24);
  1732.  
  1733. EXTERN_API( CTabHandle )
  1734. GetCTable                        (short                     ctID)                                ONEWORDINLINE(0xAA18);
  1735.  
  1736. EXTERN_API( CCrsrHandle )
  1737. GetCCursor                        (short                     crsrID)                                ONEWORDINLINE(0xAA1B);
  1738.  
  1739. EXTERN_API( void )
  1740. SetCCursor                        (CCrsrHandle             cCrsr)                                ONEWORDINLINE(0xAA1C);
  1741.  
  1742. EXTERN_API( void )
  1743. AllocCursor                        (void)                                                        ONEWORDINLINE(0xAA1D);
  1744.  
  1745. EXTERN_API( void )
  1746. DisposeCCursor                    (CCrsrHandle             cCrsr)                                ONEWORDINLINE(0xAA26);
  1747.  
  1748. #if OLDROUTINELOCATIONS
  1749. EXTERN_API( CIconHandle )
  1750. GetCIcon                        (short                     iconID)                                ONEWORDINLINE(0xAA1E);
  1751.  
  1752. EXTERN_API( void )
  1753. PlotCIcon                        (const Rect *            theRect,
  1754.                                  CIconHandle             theIcon)                            ONEWORDINLINE(0xAA1F);
  1755.  
  1756. EXTERN_API( void )
  1757. DisposeCIcon                    (CIconHandle             theIcon)                            ONEWORDINLINE(0xAA25);
  1758.  
  1759. #endif  /* OLDROUTINELOCATIONS */
  1760.  
  1761. EXTERN_API( void )
  1762. SetStdCProcs                    (CQDProcs *                procs)                                ONEWORDINLINE(0xAA4E);
  1763.  
  1764. EXTERN_API( GDHandle )
  1765. GetMaxDevice                    (const Rect *            globalRect)                            ONEWORDINLINE(0xAA27);
  1766.  
  1767. EXTERN_API( long )
  1768. GetCTSeed                        (void)                                                        ONEWORDINLINE(0xAA28);
  1769.  
  1770. EXTERN_API( GDHandle )
  1771. GetDeviceList                    (void)                                                        ONEWORDINLINE(0xAA29);
  1772.  
  1773. EXTERN_API( GDHandle )
  1774. GetMainDevice                    (void)                                                        ONEWORDINLINE(0xAA2A);
  1775.  
  1776. EXTERN_API( GDHandle )
  1777. GetNextDevice                    (GDHandle                 curDevice)                            ONEWORDINLINE(0xAA2B);
  1778.  
  1779. EXTERN_API( Boolean )
  1780. TestDeviceAttribute                (GDHandle                 gdh,
  1781.                                  short                     attribute)                            ONEWORDINLINE(0xAA2C);
  1782.  
  1783. EXTERN_API( void )
  1784. SetDeviceAttribute                (GDHandle                 gdh,
  1785.                                  short                     attribute,
  1786.                                  Boolean                 value)                                ONEWORDINLINE(0xAA2D);
  1787.  
  1788. EXTERN_API( void )
  1789. InitGDevice                        (short                     qdRefNum,
  1790.                                  long                     mode,
  1791.                                  GDHandle                 gdh)                                ONEWORDINLINE(0xAA2E);
  1792.  
  1793. EXTERN_API( GDHandle )
  1794. NewGDevice                        (short                     refNum,
  1795.                                  long                     mode)                                ONEWORDINLINE(0xAA2F);
  1796.  
  1797. EXTERN_API( void )
  1798. DisposeGDevice                    (GDHandle                 gdh)                                ONEWORDINLINE(0xAA30);
  1799.  
  1800. EXTERN_API( void )
  1801. SetGDevice                        (GDHandle                 gd)                                    ONEWORDINLINE(0xAA31);
  1802.  
  1803. EXTERN_API( GDHandle )
  1804. GetGDevice                        (void)                                                        ONEWORDINLINE(0xAA32);
  1805.  
  1806. EXTERN_API( long )
  1807. Color2Index                        (const RGBColor *        myColor)                            ONEWORDINLINE(0xAA33);
  1808.  
  1809. EXTERN_API( void )
  1810. Index2Color                        (long                     index,
  1811.                                  RGBColor *                aColor)                                ONEWORDINLINE(0xAA34);
  1812.  
  1813. EXTERN_API( void )
  1814. InvertColor                        (RGBColor *                myColor)                            ONEWORDINLINE(0xAA35);
  1815.  
  1816. EXTERN_API( Boolean )
  1817. RealColor                        (const RGBColor *        color)                                ONEWORDINLINE(0xAA36);
  1818.  
  1819. EXTERN_API( void )
  1820. GetSubTable                        (CTabHandle             myColors,
  1821.                                  short                     iTabRes,
  1822.                                  CTabHandle             targetTbl)                            ONEWORDINLINE(0xAA37);
  1823.  
  1824. EXTERN_API( void )
  1825. MakeITable                        (CTabHandle             cTabH,
  1826.                                  ITabHandle             iTabH,
  1827.                                  short                     res)                                ONEWORDINLINE(0xAA39);
  1828.  
  1829. EXTERN_API( void )
  1830. AddSearch                        (ColorSearchUPP         searchProc)                            ONEWORDINLINE(0xAA3A);
  1831.  
  1832. EXTERN_API( void )
  1833. AddComp                            (ColorComplementUPP     compProc)                            ONEWORDINLINE(0xAA3B);
  1834.  
  1835. EXTERN_API( void )
  1836. DelSearch                        (ColorSearchUPP         searchProc)                            ONEWORDINLINE(0xAA4C);
  1837.  
  1838. EXTERN_API( void )
  1839. DelComp                            (ColorComplementUPP     compProc)                            ONEWORDINLINE(0xAA4D);
  1840.  
  1841. EXTERN_API( void )
  1842. SetClientID                        (short                     id)                                    ONEWORDINLINE(0xAA3C);
  1843.  
  1844. EXTERN_API( void )
  1845. ProtectEntry                    (short                     index,
  1846.                                  Boolean                 protect)                            ONEWORDINLINE(0xAA3D);
  1847.  
  1848. EXTERN_API( void )
  1849. ReserveEntry                    (short                     index,
  1850.                                  Boolean                 reserve)                            ONEWORDINLINE(0xAA3E);
  1851.  
  1852. EXTERN_API( void )
  1853. SetEntries                        (short                     start,
  1854.                                  short                     count,
  1855.                                  CSpecArray             aTable)                                ONEWORDINLINE(0xAA3F);
  1856.  
  1857. EXTERN_API( void )
  1858. SaveEntries                        (CTabHandle             srcTable,
  1859.                                  CTabHandle             resultTable,
  1860.                                  ReqListRec *            selection)                            ONEWORDINLINE(0xAA49);
  1861.  
  1862. EXTERN_API( void )
  1863. RestoreEntries                    (CTabHandle             srcTable,
  1864.                                  CTabHandle             dstTable,
  1865.                                  ReqListRec *            selection)                            ONEWORDINLINE(0xAA4A);
  1866.  
  1867. EXTERN_API( short )
  1868. QDError                            (void)                                                        ONEWORDINLINE(0xAA40);
  1869.  
  1870. EXTERN_API( void )
  1871. CopyDeepMask                    (const BitMap *            srcBits,
  1872.                                  const BitMap *            maskBits,
  1873.                                  const BitMap *            dstBits,
  1874.                                  const Rect *            srcRect,
  1875.                                  const Rect *            maskRect,
  1876.                                  const Rect *            dstRect,
  1877.                                  short                     mode,
  1878.                                  RgnHandle                 maskRgn) /* can be NULL */            ONEWORDINLINE(0xAA51);
  1879.  
  1880. EXTERN_API( void )
  1881. DeviceLoop                        (RgnHandle                 drawingRgn,
  1882.                                  DeviceLoopDrawingUPP     drawingProc,
  1883.                                  long                     userData,
  1884.                                  DeviceLoopFlags         flags)                                ONEWORDINLINE(0xABCA);
  1885.  
  1886.  
  1887.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1888.                                                                                             #pragma parameter __A0 GetMaskTable
  1889.                                                                                             #endif
  1890. EXTERN_API( Ptr )
  1891. GetMaskTable                    (void)                                                        ONEWORDINLINE(0xA836);
  1892.  
  1893. EXTERN_API( PatHandle )
  1894. GetPattern                        (short                     patternID)                            ONEWORDINLINE(0xA9B8);
  1895.  
  1896. #if TARGET_OS_MAC
  1897.     #define MacGetCursor GetCursor
  1898. #endif
  1899. EXTERN_API( CursHandle )
  1900. MacGetCursor                    (short                     cursorID)                            ONEWORDINLINE(0xA9B9);
  1901.  
  1902. EXTERN_API( PicHandle )
  1903. GetPicture                        (short                     pictureID)                            ONEWORDINLINE(0xA9BC);
  1904.  
  1905. EXTERN_API( long )
  1906. DeltaPoint                        (Point                     ptA,
  1907.                                  Point                     ptB)                                ONEWORDINLINE(0xA94F);
  1908.  
  1909. EXTERN_API( void )
  1910. ShieldCursor                    (const Rect *            shieldRect,
  1911.                                  Point                     offsetPt)                            ONEWORDINLINE(0xA855);
  1912.  
  1913. EXTERN_API( void )
  1914. ScreenRes                        (short *                scrnHRes,
  1915.                                  short *                scrnVRes)                            SIXWORDINLINE(0x225F, 0x32B8, 0x0102, 0x225F, 0x32B8, 0x0104);
  1916.  
  1917. EXTERN_API( void )
  1918. GetIndPattern                    (Pattern *                thePat,
  1919.                                  short                     patternListID,
  1920.                                  short                     index);
  1921.  
  1922. #if CGLUESUPPORTED
  1923. EXTERN_API_C( Boolean )
  1924. ptinrect                        (const Point *            pt,
  1925.                                  const Rect *            r);
  1926.  
  1927. EXTERN_API_C( void )
  1928. pt2rect                            (const Point *            pt1,
  1929.                                  const Point *            pt2,
  1930.                                  Rect *                    destRect);
  1931.  
  1932. EXTERN_API_C( void )
  1933. pttoangle                        (const Rect *            r,
  1934.                                  const Point *            pt,
  1935.                                  short *                angle);
  1936.  
  1937. EXTERN_API_C( Boolean )
  1938. ptinrgn                            (const Point *            pt,
  1939.                                  RgnHandle                 rgn);
  1940.  
  1941. EXTERN_API_C( void )
  1942. addpt                            (const Point *            src,
  1943.                                  Point *                dst);
  1944.  
  1945. EXTERN_API_C( void )
  1946. subpt                            (const Point *            src,
  1947.                                  Point *                dst);
  1948.  
  1949. EXTERN_API_C( Boolean )
  1950. equalpt                            (const Point *            pt1,
  1951.                                  const Point *            pt2);
  1952.  
  1953. EXTERN_API_C( void )
  1954. stuffhex                        (void *                    thingPtr,
  1955.                                  const char *            s);
  1956.  
  1957. EXTERN_API_C( void )
  1958. stdline                            (const Point *            newPt);
  1959.  
  1960. EXTERN_API_C( void )
  1961. shieldcursor                    (const Rect *            shieldRect,
  1962.                                  Point *                offsetPt);
  1963.  
  1964. EXTERN_API_C( long )
  1965. deltapoint                        (Point *                ptA,
  1966.                                  Point *                ptB);
  1967.  
  1968. #endif  /* CGLUESUPPORTED */
  1969.  
  1970. #if OLDROUTINENAMES
  1971. #define DisposPixMap(pm) DisposePixMap(pm)
  1972. #define DisposPixPat(pp) DisposePixPat(pp)
  1973. #define DisposCTable(cTable) DisposeCTable(cTable)
  1974. #define DisposCCursor(cCrsr) DisposeCCursor(cCrsr)
  1975. #if OLDROUTINELOCATIONS
  1976. #define DisposCIcon(theIcon) DisposeCIcon(theIcon)
  1977. #endif  /* OLDROUTINELOCATIONS */
  1978.  
  1979. #define DisposGDevice(gdh) DisposeGDevice(gdh)
  1980. #endif  /* OLDROUTINENAMES */
  1981.  
  1982. /*
  1983.     From ToolUtils.i
  1984. */
  1985. EXTERN_API( void )
  1986. PackBits                        (Ptr *                    srcPtr,
  1987.                                  Ptr *                    dstPtr,
  1988.                                  short                     srcBytes)                            ONEWORDINLINE(0xA8CF);
  1989.  
  1990. EXTERN_API( void )
  1991. UnpackBits                        (Ptr *                    srcPtr,
  1992.                                  Ptr *                    dstPtr,
  1993.                                  short                     dstBytes)                            ONEWORDINLINE(0xA8D0);
  1994.  
  1995. EXTERN_API( Fixed )
  1996. SlopeFromAngle                    (short                     angle)                                ONEWORDINLINE(0xA8BC);
  1997.  
  1998. EXTERN_API( short )
  1999. AngleFromSlope                    (Fixed                     slope)                                ONEWORDINLINE(0xA8C4);
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013. #if PRAGMA_STRUCT_ALIGN
  2014.     #pragma options align=reset
  2015. #elif PRAGMA_STRUCT_PACKPUSH
  2016.     #pragma pack(pop)
  2017. #elif PRAGMA_STRUCT_PACK
  2018.     #pragma pack()
  2019. #endif
  2020.  
  2021. #ifdef PRAGMA_IMPORT_OFF
  2022. #pragma import off
  2023. #elif PRAGMA_IMPORT
  2024. #pragma import reset
  2025. #endif
  2026.  
  2027. #ifdef __cplusplus
  2028. }
  2029. #endif
  2030.  
  2031. #endif /* __QUICKDRAW__ */
  2032.  
  2033.